// Coded by Shambler (Shambler@OldUnreal.com, Shambler__@Hotmail.com, ICQ: 108730864) and portal effects by Fuegerstef
Class pgPortalGunMut extends Mutator
	config(UnitedMut);

var globalconfig bool bOthersCanUsePortals;

static function FillPlayInfo(PlayInfo PlayInfo)
{
	Super.FillPlayInfo(PlayInfo);

	PlayInfo.AddSetting("PortalGun", "bOthersCanUsePortals", "Others can use portals", 0, 0, "Check");
}

static event string GetDescriptionText(string PropName)
{
	switch (PropName)
	{
		case "bOthersCanUsePortals":	return "If false, only player owning the portal can warp using it";
	}
}

function ModifyPlayer(Pawn Other)
{
	local weapon NewWeapon;

	NewWeapon = Spawn(Class'pgPortalGun',,, Other.Location);

	if (NewWeapon != none)
	{
		NewWeapon.GiveTo(Other);
		NewWeapon.bCanThrow = False;
	}

	Super.ModifyPlayer(Other);
}

defaultproperties
{
	bAddToServerPackages=True
	GroupName="KF-PortalGun"
	FriendlyName="Portal Gun Mutator"
	Description="Adds the Portal Gun"
}
